<template>
	<view>
		<u-cell-group>
			<u-cell-item title="远景" :arrow="false">
				<view class="u-flex-col u-col-bottom">
					<u-image @tap="$preview(data.OldPhotoUrl)" :width="200" :height="200" :src="$getRemoteUrl(data.OldPhotoUrl)"></u-image>
				</view>
			</u-cell-item>
			<u-cell-item title="近景" :arrow="false">
				<view class="u-flex-col u-col-bottom">
					<u-image @tap="$preview(data.PhotoUrl)" :width="200" :height="200" :src="$getRemoteUrl(data.PhotoUrl)"></u-image>
				</view>
			</u-cell-item>
			<u-cell-item title="夜景" :arrow="false">
				<view class="u-flex-col u-col-bottom">
					<u-image @tap="$preview(data.PhotoUrl2)" :width="200" :height="200" :src="$getRemoteUrl(data.PhotoUrl2)"></u-image>
				</view>
			</u-cell-item>
			<u-cell-item title="门头宽度" :arrow="false" :value="data.StoreWith"></u-cell-item>
			<u-cell-item title="门头高度" :arrow="false" :value="data.StoreHeight"></u-cell-item>
			<u-cell-item title="发光字高度" :arrow="false" :value="data.LightHeight"></u-cell-item>
			<u-cell-item title="完工日期" :arrow="false" :value="data.Created | date('yyyy-mm-dd')"></u-cell-item>
			<u-cell-item :border-bottom="false" title="门店等级" :arrow="false" style="padding-bottom: 0;">
				<u-radio-group :value="data.DoorGrade" :disabled="true">
					<u-radio :name="1">一类门店</u-radio>
					<u-radio :name="2">二类门店</u-radio>
				</u-radio-group>
			</u-cell-item>
			<u-cell-item :arrow="false">
				<view class="u-font-10 u-text-left">一类门店:地级市以上，地理位置优越的临街专卖店</view>
				<view class="u-font-10 u-text-left">二类门店:县及县级市以上，地理位置良好的临街专卖店及大型建材连锁店中店（红星美凯龙，居然之家等）</view>
			</u-cell-item>
			<u-cell-item title="门店类型" :arrow="false" :value="doorTypeText"></u-cell-item>
			<u-cell-item title="精选门头" :arrow="false">
				<u-radio-group :value="data.IsGoodDoor" :disabled="true">
					<u-radio :name="1">是</u-radio>
					<u-radio :name="2">否</u-radio>
				</u-radio-group>
			</u-cell-item>
			<u-cell-item title="申请文件" :arrow="false"></u-cell-item>
			<u-cell-item title="合同文件" :arrow="false">
				<text @tap="$openFile($getRemoteUrl(data.EnclosureFile))">{{ data.EnclosureName }}</text>
			</u-cell-item>
			<u-cell-item title="价格" :arrow="false">
				<view class="">
					<text>{{ data.Price == -1 ? '' : data.Price }}</text>元
				</view>
			</u-cell-item>
			<u-cell-item title="支付类型" :arrow="false">
				<u-radio-group :disabled="true" :value="data.PayType">
					<u-radio :name="1">商城支付</u-radio>
					<u-radio :name="2">第三方支付</u-radio>
					<u-radio :name="3">未支付</u-radio>
				</u-radio-group>
			</u-cell-item>
			<u-cell-item title="批复金额" :arrow="false">
				<view class="">
					<text>{{ data.ReplyPrice == -1 ? '' : data.ReplyPrice }}</text>
					元
				</view>
			</u-cell-item>
			<u-cell-item title="申请日期" :arrow="false" :value="data.STime | date('yyyy-mm-dd')"></u-cell-item>
			<u-cell-item title="申请备注" :arrow="false"><u-input placeholder="" type="textarea" inputAlign="right" :disabled="true" :value="data.totalRemark_textarea"></u-input></u-cell-item>
			<u-cell-item title="审核状态" :arrow="false" :value="data.StateName"></u-cell-item>
			<u-cell-item title="初审意见" :arrow="false" :value="data.FirstAuditNote"></u-cell-item>
			<u-cell-item title="复审意见" :arrow="false" :value="data.ReviewAuditNote"></u-cell-item>
			<u-cell-item title="终审意见" :arrow="false" :value="data.FinalAuditNote"></u-cell-item>
		</u-cell-group>
	</view>
</template>

<script>
export default {
	name: 'door-money-information',
	props: {
		data: {
			type: Object,
			default() {
				return {
					ApplyFile: '',
					Created: null,
					DealerId: null,
					DoorGrade: null,
					DoorType: null,
					EnclosureFile: '',
					EnclosureName: '',
					FinalAuditNote: '',
					FirstAuditNote: '',
					IsGoodDoor: 0,
					LightHeight: null,
					OldPhotoUrl: null,
					PayType: 0,
					PhotoUrl: '',
					PhotoUrl2: '',
					Price: null,
					ReplyPrice: null,
					ReplyTime: null,
					ReviewAuditNote: '',
					STime: null,
					State: '',
					StateName: '',
					StoreHeight: null,
					StoreWith: null,
					totalRemark_textarea: ''
				};
			}
		}
	},
	data() {
		return {
			doorTypeList: [{ label: '小型 字高＜0.5m', value: 1 }, { label: '中型 字高0.5m~0.8m', value: 2 }, { label: '大型 字高＞0.8m', value: 3 }],
			showDoorTypePicker: false
		};
	},

	computed: {
		doorTypeText() {
			if (this.data.DoorType == 1) {
				return this.doorTypeList[0].label;
			} else if (this.data.DoorType == 2) {
				return this.doorTypeText[1].label;
			} else if (this.data.DoorType == 3) {
				return this.doorTypeList[2].label;
			} else {
				return '';
			}
		}
	}
};
</script>

<style lang="scss"></style>
